function orderCategoryTypeChange(obj){
	var orderType = $(obj).val();
	if('DRIVER' == orderType){
		window.location.href="/order";
	}else if('DELIVERY' == orderType){
		window.location.href="/order/deliveryAddOrder";
	}else if('CAROVERHAUL' == orderType){
		window.location.href="/order/caroverhaulAddOrder";
	}else if('AIRPORT' == orderType){
		window.location.href="/order/airportAddOrder";
	}else if('STATION' == orderType){
		window.location.href="/order/stationAddOrder";
	}else if('UNLOCK' == orderType){
		window.location.href="/order/unlockAddOrder";
	}else if('BREAKRULE' == orderType){
		window.location.href="/order/breakruleAddOrder";
	}else if('CLEANSERVER' == orderType){
		window.location.href="/order/cleanserverAddOrder";
	}else if('TRUNK' == orderType){
		window.location.href="/order/trunkAddOrder";
	}else if('HEADHUNTING' == orderType){
		window.location.href="/order/headhuntingAddOrder";
	}else if('BABYSITTER' == orderType){
		window.location.href="/order/babysitterAddOrder";
	}else if('PARK' == orderType){
		window.location.href="/newOrder/addNewPark";
	}
}

function loadTerminal(){
	var cityId = $("#city_id").val();
	if(cityId != null && cityId != ""){
		var visitUrl = "/newOrder/loadCityParks/"+cityId + "?time="+new Date();
		$.ajax({
			url: visitUrl,
			data: '',
			type:"GET",
			async :true, // 异步
			dataType:"json",
			success:function(retData){
				var dataObj = retData.terminals;
				$("#terminal_id").empty();
				if(dataObj.length==0)
					$("#terminal_id").append("<option value='' selected></option>");
				$.each(dataObj, function (index, item) {
					$("#terminal_id").append("<option value='"+item.terminal_id+"'>"+item.terminal_name+"</option>");
				});
			},error : function(textStatus) {
				alert("获取机场失败");
			}
		});
	}
}

function loadTerminalId(cityId){
	if(cityId != null && cityId != ""){
		var visitUrl = "/newOrder/loadCityParks/"+cityId + "?time="+new Date();
		$.ajax({
			url: visitUrl,
			data: '',
			type:"GET",
			async :true, // 异步
			dataType:"json",
			success:function(retData){
				var dataObj = retData.terminals;
				$("#terminal_id").empty();
				$.each(dataObj, function (index, item) {
					$("#terminal_id").append("<option value='"+item.terminal_id+"'>"+item.terminal_name+"</option>");
				});
			},error : function(textStatus) {
				alert("获取机场失败");
			}
		});
	}
}